/**
 * Created by chourongqishi on 2017/1/2.
 * 邮件重新发送
 */
module.exports = function ($http, $q, httpservice) {
    var emailrightService = {};

    /**
     * 邮件重新发送
     * @returns {Promise}
     */
    emailrightService.resendEmailUrl = function (email) {

        var params = {"email": email};

        var deferred = $q.defer();
        $http({
            method: 'POST',
            url: httpservice.resendEmailUrl,
            data: params,
            headers: {'Content-Type': 'application/json'}
        }).then(function successCallback(response) {
            deferred.resolve(response.data);
        }, function errorCallback(response) {
            deferred.reject(response);
        });
        return deferred.promise;
    };


    return emailrightService;
};